home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / CMPLTPAS / GFILE.PAS < prev    next >
Pascal/Delphi Source File  |  1988-07-24  |  2KB  |  41 lines

  1. {--------------------------------------------------------------}
  2. {                         GraphFiler                           }
  3. {                                                              }
  4. {            Graphics file I/O demonstration program           }
  5. {                                                              }
  6. {                             by Jeff Duntemann                }
  7. {                             Turbo Pascal V5.0                }
  8. {                             Last update 7/24/88              }
  9. {                                                              }
  10. {     From: COMPLETE TURBO PASCAL 5.0  by Jeff Duntemann       }
  11. {    Scott, Foresman & Co., Inc. 1988   ISBN 0-673-38355-5     }
  12. {--------------------------------------------------------------}
  13.  
  14. PROGRAM GraphFiler;
  15.  
  16. USES Crt,Graph3;   { Uses Turbo Pascal 3.0-style graphics for }
  17.                    { simplicity's sake... }
  18.  
  19. VAR
  20.   I         : Integer;
  21.   ErrorCode : Integer;
  22.  
  23.  
  24. {$I GSAVE.SRC}
  25. {$I GLOAD.SRC}
  26.  
  27.  
  28. BEGIN  { GraphFiler MAIN }
  29.   ClrScr;                          { Clear the text screen }
  30.   HiResColor(15);                  { Use white as foreground color }
  31.   HiRes;                           { Clears graphics screen }
  32.   TextColor(1);
  33.   FOR I := 0 TO 199 DO             { Draw lines }
  34.     IF I MOD 5 = 0 THEN Draw(0,0,640,I,1);
  35.   GSave('LINES.PIC',ErrorCode);    { Save graphics image to a file }
  36.   Write('Press RETURN to clear screeen and re-load image: ');
  37.   Readln;
  38.   HiRes;                           { Clears graphics screen }
  39.   GLoad('LINES.PIC',ErrorCode);    { Load saved file into display buffer }
  40.   Readln                           { Wait for RETURN before terminating }
  41. END.